package com.tokenplus.thai.components.toast

import android.annotation.SuppressLint
import android.content.Context
import android.util.AttributeSet
import android.view.View
import android.widget.RelativeLayout
import com.tokenplus.thai.R
import com.tokenplus.thai.databinding.ViewCheckinSuccessBinding

class CheckinSuccessToast : RelativeLayout {

    lateinit var mViewBinding: ViewCheckinSuccessBinding
    private lateinit var vRootView: View

    constructor(context: Context?) : this(context, null)
    constructor(context: Context?, attrs: AttributeSet?) : this(context, attrs, 0)
    constructor(context: Context?, attrs: AttributeSet?, defStyleAttr: Int) : this(
        context,
        attrs,
        defStyleAttr,
        0
    )

    @SuppressLint("Recycle")
    constructor(
        context: Context?,
        attrs: AttributeSet?,
        defStyleAttr: Int,
        defStyleRes: Int,
    ) : super(
        context,
        attrs,
        defStyleAttr,
        defStyleRes
    ) {
        attrs?.let {
            context?.let { cxt ->

            }
        }
        context?.let {
            vRootView = View.inflate(it, R.layout.view_checkin_success, this)
            mViewBinding =
                ViewCheckinSuccessBinding.bind(vRootView)
            initSubviews()
        }
    }

     fun initSubviews() {

    }

    fun setAmount(amunt:String?){
        mViewBinding.checkinEarnAmount.text = amunt
    }
}